//模型创建 https://www.sequelize.com.cn/core-concepts/model-basics#%E5%AD%97%E7%AC%A6%E4%B8%B2

//关于字典信息
module.exports = (sequelize, Sequelize) => {
    return sequelize.define("dictVal",
        {
            id: {
                type: Sequelize.UUID,
                notNull: true,
                primaryKey: true,
                defaultValue: Sequelize.UUIDV4 // 或 DataTypes.UUIDV1
            },
            dictId: {
                type: Sequelize.STRING,
                notEmpty: true,
                notNull: true,
                comment: '父节点',
            },
            key: {
                type: Sequelize.STRING,
                notEmpty: true,
                notNull: true,
                comment: '字典名',
            },
            value: {
                type: Sequelize.STRING,
                notEmpty: true,
                notNull: true,
                comment: '字典值',
            }

        }, {
        tableName: 'mg_dict_val'
    });
};
